//
//  MBAUtils.swift
//  chat
//
//  Created by 1 on 2023/4/4.
//

import Foundation
import SwiftUI

struct MBAUtils{
    static func hideKeyboard() {
        UIApplication.shared.sendAction(
            #selector(UIResponder.resignFirstResponder),
            to: nil,
            from: nil,
            for: nil
        )
    }
    
    
    static func showKnowAlert(message: String) {
        if let vc = MBAInfo.rootViewController(){
            let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
            alert.addAction(UIAlertAction(title: "知道了", style: .default))
            vc.present(alert, animated: true)
        }
    }
}

